/*
{
"状态":1,
"名称":"分配-cmd权限",
"作者":"马学兵",
"创建时间":"2018-10-24",
"功能":"分配-cmd权限",
"log": [
	{"date":"" , "dev" :"" , "content" : ""}
]
}
*/

DECLARE @cmd_power_id VARCHAR(100)
DECLARE @cmd_key VARCHAR(4000)

SET @cmd_power_id='{cmd_power_id}'
SET @cmd_key='{cmd_key}'

UPDATE y_cmd SET cmd_power_id=@cmd_power_id
WHERE cmd_key IN (SELECT CONVERT(int,value) FROM dbo.Ft_Split(@cmd_key,','))